const { createReadStream } = require("fs");

const rs = createReadStream(__dirname + '/demo2.txt')

rs.on('close',()=>{
  console.log('可读流关闭了');
})

rs.on('data',(data)=>{
  console.log(data);
})